package tech.aistar.corejava.day06;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:
 * @date 2019/7/22 0022
 */
public class EmpTest {
    public static void main(String[] args) {
        //1. 创建一个下属的对象
        Emp e1 = new Emp(1,"tom",23,null);
        Emp e2= new Emp(2,"jack",23,null);
        Emp e3= new Emp(3,"jack",23,null);

        //2. 创建一个上司的对象
        //Emp[] ee = new Emp[0];
        //Emp boss = new Emp(2,"success",18,ee);
        Emp boss = new Emp(3,"success",18,new Emp[0]);

        //下属调用addEmp
        //e1.addEmp(boss);

        //上司调用addEmp
        boss.addEmp(e1);
        boss.addEmp(e2);
        boss.addEmp(e3);

        //调用根据id进行删除
        //boss.delById(2);
         boss.delByEmpName("jack");

        System.out.println(boss);
    }
}
